package com.example.wiki.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.wiki.entity.Doc;
import com.example.wiki.entity.req.DocQueryReq;
import com.example.wiki.entity.req.DocSaveReq;
import com.example.wiki.entity.resp.DocQueryResp;
import com.example.wiki.entity.resp.PageResp;

import java.util.List;

/**
 * <p>
 * 文档表 服务类
 * </p>
 *
 * @author jerry
 * @since 2024-10-08
 */
public interface IDocService extends IService<Doc> {

    PageResp<DocQueryReq> getDocListByPage(DocQueryReq req);

    List<DocQueryResp> allList(DocQueryReq req);

    //加入content的内容的处理
    boolean saveOrUpdateDoc(DocSaveReq req);

    //根据id查询content
    String findContent(Long id);

    //自增
    public int increaseViewCount(int id);
    //点赞
    public int increaseVoteCount(int id);
    //更新ebook信息
    public int updateEbookInfo();

}
